<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <title>01-float简单认识</title>
    <style>
        .container {
            width: 400px;
            height: 400px;
            border: 1px solid #000;
        }

        .box1 {
            width: 100px;
            height: 100px;
            background-color: #f00;
            /* 浮动能让元素脱离标准流 */
            float: left;
            /*float: right;*/
        }

        .box2 {
            width: 200px;
            height: 200px;
            background-color: #ff0;
            position: relative;
        }
    </style>
</head>
<body>

<div class="container">
    <div class="box1"></div>
    <div class="box2"></div>
</div>

</body>
</html>